package com.example.demo.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BookBorrow {
    private Integer bookborrowId;

    private Integer userId;

    private Integer bookinfoId;

    private Date timeBorrrow;

    private Date timeNeedBack;

    private Integer ifBack;

    private Integer renewCnt;

    private Date timeBack;

    private String deleteFlag;

    private String bookname;

    private String userName;

    private Double price;

    public BookBorrow(Integer id, String bookname) {
        userId=id;
        this.bookname=bookname;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getBookname() {
        return bookname;
    }

    public void setBookname(String bookname) {
        this.bookname = bookname;
    }

    public Integer getBookborrowId() {
        return bookborrowId;
    }

    public void setBookborrowId(Integer bookborrowId) {
        this.bookborrowId = bookborrowId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getBookinfoId() {
        return bookinfoId;
    }

    public void setBookinfoId(Integer bookinfoId) {
        this.bookinfoId = bookinfoId;
    }

    public Date getTimeBorrrow() {
        return timeBorrrow;
    }

    public void setTimeBorrrow(Date timeBorrrow) {
        this.timeBorrrow = timeBorrrow;
    }

    public Date getTimeNeedBack() {
        return timeNeedBack;
    }

    public void setTimeNeedBack(Date timeNeedBack) {
        this.timeNeedBack = timeNeedBack;
    }

    public Integer getIfBack() {
        return ifBack;
    }

    public void setIfBack(Integer ifBack) {
        this.ifBack = ifBack;
    }

    public Integer getRenewCnt() {
        return renewCnt;
    }

    public void setRenewCnt(Integer renewCnt) {
        this.renewCnt = renewCnt;
    }

    public Date getTimeBack() {
        return timeBack;
    }

    public void setTimeBack(Date timeBack) {
        this.timeBack = timeBack;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bookborrowId=").append(bookborrowId);
        sb.append(", userId=").append(userId);
        sb.append(", bookinfoId=").append(bookinfoId);
        sb.append(", timeBorrrow=").append(timeBorrrow);
        sb.append(", timeNeedBack=").append(timeNeedBack);
        sb.append(", ifBack=").append(ifBack);
        sb.append(", renewCnt=").append(renewCnt);
        sb.append(", timeBack=").append(timeBack);
        sb.append(", deleteFlag=").append(deleteFlag);
        sb.append("]");
        return sb.toString();
    }
}